import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Login from '../views/LoginView'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: '首页',
        component: Login
    },

    /*--------------------------以下内容都不在框架空白处，都是单独的页面--------------------------*/
    {
        path: '/about',
        name: 'about',
        component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    },
    {
        path: '/reg',
        name: '注册',
        component: () => import('../views/RegView.vue')
    },
    {
        path: '/exam-marking',
        name: '阅卷页面',
        component: () => import('../views/admin/ExamMarking.vue')
    },
    {
        path: '/exam-examStart',
        name: '考试页面',
        component: () => import('../views/student/StudentExamStart.vue')
    },
    {
        path: '/student-info',
        name: '学生个人信息页',
        component: () => import('../views/student/StudentInfo.vue')
    },
    {
        path: '/record-detail',
        name: '学生端 试卷详情',
        component: () => import('../views/StudentRecordDetail.vue')
    },
    {
        path: '/student',
        name:'学生端模板',
        component: () => import('../views/student/StudentHome.vue'),
        /*------------------------------以下是学生端子页面-----------------------------*/
        children: [
            {
                path: '/student/record',
                name: '学生端我的试卷',
                component:()=> import ('../views/student/StudentRecord.vue')
            },
            {
                path: '/student/exam',
                name: '学生端我的考试',
                component:()=> import ('../views/student/StudentExam.vue')
            },
            {
                path: '/student/info',
                name: '学生个人信息页',
                component: () => import('../views/student/StudentInfo.vue')
            },
            {
                path: '/student/blank',
                name: '学生主页',
                component: () => import('../views/student/StudentBlank.vue')
            },
        ]
    },
    /*--------------------------以下内容都是管理端子页面--------------------------*/
    {
        path: '/home',
        name: '首页',
        component: HomeView,
        children: [
            /*修改资料*/
            {
                path: '/updateOwn',
                name: '修改信息',
                component: () => import('../views/UpdateOwn.vue')
            },
            {
                path: '/blank',
                name: '空白页',
                component: () => import('../views/NothingWeb.vue')
            },
            /*------------------考试管理页面------------------*/
            {
                path: '/bank',
                name: '题库管理',
                component: () => import('../views/admin/BankManage.vue')
            },
            {
                path: '/bank/add-new',
                name: '添加题库',
                component: () => import('../views/admin/BankAddNew.vue')
            },
            {
                path: '/question',
                name: '试题管理',
                component: () => import('../views/admin/QuestionManage.vue')
            },
            /*--------------------------考试管理-------------------------------*/
            {
                path: '/exam',
                name: '考试管理',
                component: () => import('../views/admin/ExamManage.vue')
            },
            {
                path: '/exam/addNew1',
                name: '考试管理',
                component: () => import('../views/admin/ExamAddNew1.vue')
            },
            {
                path: '/exam/addNew1-SelectQuestion',
                name: '考试管理',
                component: () => import('../views/admin/ExamAddNew1-SelectQuestion.vue')
            },
            {
                path: '/exam/addNew2',
                name: '考试管理',
                component: () => import('../views/admin/ExamAddNew2.vue')
            },
            {
                path: '/exam/addNew3',
                name: '考试管理',
                component: () => import('../views/admin/ExamAddNew3.vue')
            },
            {
                path: '/exam/questionList',
                name: '考试列表',
                component: () => import('../views/admin/ExamQuestionList.vue')
            },
            {
                path: '/exam/questionUpdate',
                name: '考试列表',
                component: () => import('../views/admin/ExamQuestionUpdate.vue')
            },

            /*--------------------阅卷管理------------------*/
            {
                path: '/goover-exam',
                name: '阅卷管理',
                component: () => import('../views/admin/GooverexamManage.vue')
            },


            /*------------------考试统计页面------------------*/
            {
                path: '/visual',
                name: '统计总览',
                component: () => import('../views/admin/statistics/VisualChart')
            },

            /*------------------系统管理页面------------------*/
            {
                path: '/bulletin',
                name: '公告管理',
                component: () => import('../views/admin/BulletinManage.vue')
            },
            {
                path: '/user',
                name: '用户管理',
                component: () => import('../views/admin/UserMange.vue')
            },
            {
                path: '/user/add-new',
                name: '用户管理',
                component: () => import('../views/admin/UserAddNewMange.vue')
            },
            /*------------------班级管理与专业管理------------------*/
            {
                path: '/class',
                name: '班级管理',
                component: () => import('../views/admin/ManagementManage')
            },
            {
                path: '/major',
                name: '专业管理',
                component: () => import('../views/admin/MajorManagement.vue')
            },
            {
                path: '/class/ClassDetails',
                name: '班级详情',
                component: () => import('../views/admin/ClassDetails.vue')
            },
            {
                path: '/major/add-new',
                name: '添加专业',
                component: () => import('../views/admin/MajorAddNew.vue')
            },
            {
                path: '/class/add-new',
                name: '添加班级',
                component: () => import('../views/admin/ClassAddNew.vue')
            },
            {
                path: '/class/exam-detail',
                name: '班级考试详情',
                component: () => import('../views/admin/ClassExamDetailView.vue')
            },
            {
                path: '/class/achievement',
                name: '学生考试成绩',
                component: () => import('../views/admin/ClassAchievement.vue')
            },
        ]
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
